package pers.youqu.auth.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.youqu.auth.service.ALIAuthService;

import java.util.Map;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/12/6 17:22
 * @Description TODO
 */
@RestController
public class ALIAuthController {

    private final ALIAuthService aliAuthService;

    public ALIAuthController(ALIAuthService aliAuthService) {
        this.aliAuthService = aliAuthService;
    }

    @GetMapping("/ali/oss/signature")
    public ResponseEntity<Map<String,String>> getAliSignature() {
        System.out.println("请求获取签名");
        return ResponseEntity.ok(aliAuthService.getAliSignature());
    }

}
